/**
 * Created by asus on 2017/4/28.
 */
import * as types from './mutationTypes'

export default {
  [types.AFFICHE_QUERY_AFFICHES_BEGIN](state) {
    state.affiches = [];
  },
  [types.AFFICHE_QUERY_AFFICHES_SUC](state, {affiches, currentPage, totalCount}) {
    state.affiches = affiches;
    state.currentPage = currentPage;
    state.totalCount = totalCount;
  },
  [types.AFFICHE_QUERY_UP_SUC](state, {affiches}) {
    state.affiches = affiches.concat(state.affiches);
  },
  [types.AFFICHE_SET_EDITING_AFFICHE](state, {affiche}) {
    state.editingAffiche = affiche;
  },
  [types.AFFICHE_DELETE_SUC](state) {
  },
  [types.AFFICHE_SET_PAGE_MODEL](state, {modelType}) {
    //''
    state.pageModel = modelType
  },
  [types.AFFICHE_RELEASE_SUC](state) {
  },
  [types.AFFICHE_UPDATE_SUC](state) {
    state.editingAffiche = null;
  }
}
/**
 * Created by asus on 2017/5/2.
 */
